/**************************************************
beginning of licensing agreement
Microsoft Public License (Ms-PL)

This license governs use of the accompanying software. If you use the software, you accept this license. If you do not accept the license, do not use the software.

1. Definitions

The terms "reproduce," "reproduction," "derivative works," and "distribution" have the same meaning here as under U.S. copyright law.

A "contribution" is the original software, or any additions or changes to the software.

A "contributor" is any person that distributes its contribution under this license.

"Licensed patents" are a contributor's patent claims that read directly on its contribution.

2. Grant of Rights

(A) Copyright Grant- Subject to the terms of this license, including the license conditions and limitations in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free copyright license to reproduce its contribution, prepare derivative works of its contribution, and distribute its contribution or any derivative works that you create.

(B) Patent Grant- Subject to the terms of this license, including the license conditions and limitations in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free license under its licensed patents to make, have made, use, sell, offer for sale, import, and/or otherwise dispose of its contribution in the software or derivative works of the contribution in the software.

3. Conditions and Limitations

(A) No Trademark License- This license does not grant you rights to use any contributors' name, logo, or trademarks.

(B) If you bring a patent claim against any contributor over patents that you claim are infringed by the software, your patent license from such contributor to the software ends automatically.

(C) If you distribute any portion of the software, you must retain all copyright, patent, trademark, and attribution notices that are present in the software.

(D) If you distribute any portion of the software in source code form, you may do so only under this license by including a complete copy of this license with your distribution. If you distribute any portion of the software in compiled or object code form, you may only do so under a license that complies with this license.

(E) The software is licensed "as-is." You bear the risk of using it. The contributors give no express warranties, guarantees or conditions. You may have additional consumer rights under your local laws which this license cannot change. To the extent permitted under your local laws, the contributors exclude the implied warranties of merchantability, fitness for a particular purpose and non-infringement. 
end of licensing agreement
**************************************************/
//------------------------------------------------------------------------------
// <autogenerated>
//     This code was generated by a tool.
//     Runtime Version: 1.1.4322.573
//
//     Changes to this file may cause incorrect behavior and will be lost if 
//     the code is regenerated.
// </autogenerated>
//------------------------------------------------------------------------------

// 
// This source code was auto-generated by xsd, Version=1.1.4322.573.
// 
namespace PssdiagTraceFilterSchema.Namespace {
    using System;
    using System.Data;
    using System.Xml;
    using System.Runtime.Serialization;
    
    
    [Serializable()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    [System.Diagnostics.DebuggerStepThrough()]
    [System.ComponentModel.ToolboxItem(true)]
    public class Filters : DataSet {
        
        private FilterDataTable tableFilter;
        
        public Filters() {
            this.InitClass();
            System.ComponentModel.CollectionChangeEventHandler schemaChangedHandler = new System.ComponentModel.CollectionChangeEventHandler(this.SchemaChanged);
            this.Tables.CollectionChanged += schemaChangedHandler;
            this.Relations.CollectionChanged += schemaChangedHandler;
        }
        
        protected Filters(SerializationInfo info, StreamingContext context) {
            string strSchema = ((string)(info.GetValue("XmlSchema", typeof(string))));
            if ((strSchema != null)) {
                DataSet ds = new DataSet();
                ds.ReadXmlSchema(new XmlTextReader(new System.IO.StringReader(strSchema)));
                if ((ds.Tables["Filter"] != null)) {
                    this.Tables.Add(new FilterDataTable(ds.Tables["Filter"]));
                }
                this.DataSetName = ds.DataSetName;
                this.Prefix = ds.Prefix;
                this.Namespace = ds.Namespace;
                this.Locale = ds.Locale;
                this.CaseSensitive = ds.CaseSensitive;
                this.EnforceConstraints = ds.EnforceConstraints;
                this.Merge(ds, false, System.Data.MissingSchemaAction.Add);
                this.InitVars();
            }
            else {
                this.InitClass();
            }
            this.GetSerializationData(info, context);
            System.ComponentModel.CollectionChangeEventHandler schemaChangedHandler = new System.ComponentModel.CollectionChangeEventHandler(this.SchemaChanged);
            this.Tables.CollectionChanged += schemaChangedHandler;
            this.Relations.CollectionChanged += schemaChangedHandler;
        }
        
        [System.ComponentModel.Browsable(false)]
        [System.ComponentModel.DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Content)]
        public FilterDataTable Filter {
            get {
                return this.tableFilter;
            }
        }
        
        public override DataSet Clone() {
            Filters cln = ((Filters)(base.Clone()));
            cln.InitVars();
            return cln;
        }
        
        protected override bool ShouldSerializeTables() {
            return false;
        }
        
        protected override bool ShouldSerializeRelations() {
            return false;
        }
        
        protected override void ReadXmlSerializable(XmlReader reader) {
            this.Reset();
            DataSet ds = new DataSet();
            ds.ReadXml(reader);
            if ((ds.Tables["Filter"] != null)) {
                this.Tables.Add(new FilterDataTable(ds.Tables["Filter"]));
            }
            this.DataSetName = ds.DataSetName;
            this.Prefix = ds.Prefix;
            this.Namespace = ds.Namespace;
            this.Locale = ds.Locale;
            this.CaseSensitive = ds.CaseSensitive;
            this.EnforceConstraints = ds.EnforceConstraints;
            this.Merge(ds, false, System.Data.MissingSchemaAction.Add);
            this.InitVars();
        }
        
        protected override System.Xml.Schema.XmlSchema GetSchemaSerializable() {
            System.IO.MemoryStream stream = new System.IO.MemoryStream();
            this.WriteXmlSchema(new XmlTextWriter(stream, null));
            stream.Position = 0;
            return System.Xml.Schema.XmlSchema.Read(new XmlTextReader(stream), null);
        }
        
        internal void InitVars() {
            this.tableFilter = ((FilterDataTable)(this.Tables["Filter"]));
            if ((this.tableFilter != null)) {
                this.tableFilter.InitVars();
            }
        }
        
        private void InitClass() {
            this.DataSetName = "Filters";
            this.Prefix = "";
            this.Namespace = "http://tempuri.org/Filters.xsd";
            this.Locale = new System.Globalization.CultureInfo("en-US");
            this.CaseSensitive = false;
            this.EnforceConstraints = false;
            this.tableFilter = new FilterDataTable();
            this.Tables.Add(this.tableFilter);
        }
        
        private bool ShouldSerializeFilter() {
            return false;
        }
        
        private void SchemaChanged(object sender, System.ComponentModel.CollectionChangeEventArgs e) {
            if ((e.Action == System.ComponentModel.CollectionChangeAction.Remove)) {
                this.InitVars();
            }
        }
        
        public delegate void FilterRowChangeEventHandler(object sender, FilterRowChangeEvent e);
        
        [System.Diagnostics.DebuggerStepThrough()]
        public class FilterDataTable : DataTable, System.Collections.IEnumerable {
            
            private DataColumn columncolumn;
            
            private DataColumn column_operator;
            
            private DataColumn columnfilter;
            
            private DataColumn columnlogicaloperator;
            
            internal FilterDataTable() : 
                    base("Filter") {
                this.InitClass();
            }
            
            internal FilterDataTable(DataTable table) : 
                    base(table.TableName) {
                if ((table.CaseSensitive != table.DataSet.CaseSensitive)) {
                    this.CaseSensitive = table.CaseSensitive;
                }
                if ((table.Locale.ToString() != table.DataSet.Locale.ToString())) {
                    this.Locale = table.Locale;
                }
                if ((table.Namespace != table.DataSet.Namespace)) {
                    this.Namespace = table.Namespace;
                }
                this.Prefix = table.Prefix;
                this.MinimumCapacity = table.MinimumCapacity;
                this.DisplayExpression = table.DisplayExpression;
            }
            
            [System.ComponentModel.Browsable(false)]
            public int Count {
                get {
                    return this.Rows.Count;
                }
            }
            
            internal DataColumn columnColumn {
                get {
                    return this.columncolumn;
                }
            }
            
            internal DataColumn _operatorColumn {
                get {
                    return this.column_operator;
                }
            }
            
            internal DataColumn filterColumn {
                get {
                    return this.columnfilter;
                }
            }
            
            internal DataColumn logicaloperatorColumn {
                get {
                    return this.columnlogicaloperator;
                }
            }
            
            public FilterRow this[int index] {
                get {
                    return ((FilterRow)(this.Rows[index]));
                }
            }
            
            public event FilterRowChangeEventHandler FilterRowChanged;
            
            public event FilterRowChangeEventHandler FilterRowChanging;
            
            public event FilterRowChangeEventHandler FilterRowDeleted;
            
            public event FilterRowChangeEventHandler FilterRowDeleting;
            
            public void AddFilterRow(FilterRow row) {
                this.Rows.Add(row);
            }
            
            public FilterRow AddFilterRow(string column, string _operator, string filter, string logicaloperator) {
                FilterRow rowFilterRow = ((FilterRow)(this.NewRow()));
                rowFilterRow.ItemArray = new object[] {
                        column,
                        _operator,
                        filter,
                        logicaloperator};
                this.Rows.Add(rowFilterRow);
                return rowFilterRow;
            }
            
            public System.Collections.IEnumerator GetEnumerator() {
                return this.Rows.GetEnumerator();
            }
            
            public override DataTable Clone() {
                FilterDataTable cln = ((FilterDataTable)(base.Clone()));
                cln.InitVars();
                return cln;
            }
            
            protected override DataTable CreateInstance() {
                return new FilterDataTable();
            }
            
            internal void InitVars() {
                this.columncolumn = this.Columns["column"];
                this.column_operator = this.Columns["operator"];
                this.columnfilter = this.Columns["filter"];
                this.columnlogicaloperator = this.Columns["logicaloperator"];
            }
            
            private void InitClass() {
                this.columncolumn = new DataColumn("column", typeof(string), null, System.Data.MappingType.Attribute);
                this.Columns.Add(this.columncolumn);
                this.column_operator = new DataColumn("operator", typeof(string), null, System.Data.MappingType.Attribute);
                this.Columns.Add(this.column_operator);
                this.columnfilter = new DataColumn("filter", typeof(string), null, System.Data.MappingType.Attribute);
                this.Columns.Add(this.columnfilter);
                this.columnlogicaloperator = new DataColumn("logicaloperator", typeof(string), null, System.Data.MappingType.Attribute);
                this.Columns.Add(this.columnlogicaloperator);
                this.columncolumn.Namespace = "";
                this.column_operator.Namespace = "";
                this.columnfilter.Namespace = "";
                this.columnlogicaloperator.Namespace = "";
            }
            
            public FilterRow NewFilterRow() {
                return ((FilterRow)(this.NewRow()));
            }
            
            protected override DataRow NewRowFromBuilder(DataRowBuilder builder) {
                return new FilterRow(builder);
            }
            
            protected override System.Type GetRowType() {
                return typeof(FilterRow);
            }
            
            protected override void OnRowChanged(DataRowChangeEventArgs e) {
                base.OnRowChanged(e);
                if ((this.FilterRowChanged != null)) {
                    this.FilterRowChanged(this, new FilterRowChangeEvent(((FilterRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowChanging(DataRowChangeEventArgs e) {
                base.OnRowChanging(e);
                if ((this.FilterRowChanging != null)) {
                    this.FilterRowChanging(this, new FilterRowChangeEvent(((FilterRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleted(DataRowChangeEventArgs e) {
                base.OnRowDeleted(e);
                if ((this.FilterRowDeleted != null)) {
                    this.FilterRowDeleted(this, new FilterRowChangeEvent(((FilterRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleting(DataRowChangeEventArgs e) {
                base.OnRowDeleting(e);
                if ((this.FilterRowDeleting != null)) {
                    this.FilterRowDeleting(this, new FilterRowChangeEvent(((FilterRow)(e.Row)), e.Action));
                }
            }
            
            public void RemoveFilterRow(FilterRow row) {
                this.Rows.Remove(row);
            }
        }
        
        [System.Diagnostics.DebuggerStepThrough()]
        public class FilterRow : DataRow {
            
            private FilterDataTable tableFilter;
            
            internal FilterRow(DataRowBuilder rb) : 
                    base(rb) {
                this.tableFilter = ((FilterDataTable)(this.Table));
            }
            
            public string column {
                get {
                    try {
                        return ((string)(this[this.tableFilter.columnColumn]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("Cannot get value because it is DBNull.", e);
                    }
                }
                set {
                    this[this.tableFilter.columnColumn] = value;
                }
            }
            
            public string _operator {
                get {
                    try {
                        return ((string)(this[this.tableFilter._operatorColumn]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("Cannot get value because it is DBNull.", e);
                    }
                }
                set {
                    this[this.tableFilter._operatorColumn] = value;
                }
            }
            
            public string filter {
                get {
                    try {
                        return ((string)(this[this.tableFilter.filterColumn]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("Cannot get value because it is DBNull.", e);
                    }
                }
                set {
                    this[this.tableFilter.filterColumn] = value;
                }
            }
            
            public string logicaloperator {
                get {
                    try {
                        return ((string)(this[this.tableFilter.logicaloperatorColumn]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("Cannot get value because it is DBNull.", e);
                    }
                }
                set {
                    this[this.tableFilter.logicaloperatorColumn] = value;
                }
            }
            
            public bool IscolumnNull() {
                return this.IsNull(this.tableFilter.columnColumn);
            }
            
            public void SetcolumnNull() {
                this[this.tableFilter.columnColumn] = System.Convert.DBNull;
            }
            
            public bool Is_operatorNull() {
                return this.IsNull(this.tableFilter._operatorColumn);
            }
            
            public void Set_operatorNull() {
                this[this.tableFilter._operatorColumn] = System.Convert.DBNull;
            }
            
            public bool IsfilterNull() {
                return this.IsNull(this.tableFilter.filterColumn);
            }
            
            public void SetfilterNull() {
                this[this.tableFilter.filterColumn] = System.Convert.DBNull;
            }
            
            public bool IslogicaloperatorNull() {
                return this.IsNull(this.tableFilter.logicaloperatorColumn);
            }
            
            public void SetlogicaloperatorNull() {
                this[this.tableFilter.logicaloperatorColumn] = System.Convert.DBNull;
            }
        }
        
        [System.Diagnostics.DebuggerStepThrough()]
        public class FilterRowChangeEvent : EventArgs {
            
            private FilterRow eventRow;
            
            private DataRowAction eventAction;
            
            public FilterRowChangeEvent(FilterRow row, DataRowAction action) {
                this.eventRow = row;
                this.eventAction = action;
            }
            
            public FilterRow Row {
                get {
                    return this.eventRow;
                }
            }
            
            public DataRowAction Action {
                get {
                    return this.eventAction;
                }
            }
        }
    }
}
